home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / Obrn-A_1.6_lib.lha / oberon-a / source3.lha / source / 3rdParty / Triton.mod < prev    next >
Text File  |  1995-05-23  |  20KB  |  454 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Triton.mod $
  4.   Description: Interface to triton.library
  5.  
  6.    Created by: Helmuth Ritzer
  7.     $Revision: 1.0 $
  8.       $Author: hr $
  9.         $Date: 1995/01/21 16:06:42 $
  10.  
  11.   This is a modified version of the interface module for
  12.   AmigaOberon done by Peter Fröhlich.
  13.  
  14.   This release contains no translations of the C macros.
  15.  
  16. ***************************************************************************)
  17.  
  18. <* STANDARD- *>
  19.  
  20. MODULE [2] Triton;
  21.  
  22. IMPORT
  23.   SYS := SYSTEM, Kernel, e := Exec, u := Utility, gfx := Graphics,
  24.   i := Intuition, gt := GadTools, w := Workbench;
  25.  
  26.  
  27. (*****************************************************************************)
  28.  
  29. CONST
  30.  
  31.   tritonName *  = "triton.library";
  32.  
  33.  
  34. (*****************************************************************************)
  35.  
  36. TYPE
  37.   MessagePtr*    = POINTER TO Message;
  38.   AppPtr*        = POINTER TO App;
  39.   DimensionsPtr* = POINTER TO Dimensions;
  40.   ProjectPtr*    = POINTER TO Project;
  41.  
  42. (* --- The Triton message --- *)
  43.  
  44.   Message* = RECORD
  45.     project-   : ProjectPtr; (* The project which triggered the message       *)
  46.     id-        : e.ULONG;    (* The object's ID (where appropriate)           *)
  47.     class-     : e.ULONG;    (* The Triton message class                      *)
  48.     data-      : e.ULONG;    (* The class-specific data                       *)
  49.     code-      : e.ULONG;    (* \ Currently only used                         *)
  50.     qualifier- : e.ULONG;    (* / by TRMS_KEYPRESSED                          *)
  51.     seconds-   : e.ULONG;    (* \ Copy of system clock time (Only where       *)
  52.     micros-    : e.ULONG;    (* / available! If not set, trm_Seconds is NULL) *)
  53.   END;
  54.  
  55. (* --- The Application Structure --- *)
  56.  
  57.   App* = RECORD (* This structure is PRIVATE! *)
  58.     memPool  : e.ADDRESS;    (* The memory pool    *)
  59.     bitMask  : e.LONGBITS;   (* Bits to Wait() for *)
  60.     name     : e.STRPTR;     (* Unique name        *)
  61.     longName : e.STRPTR;     (* User-readable name *)
  62.     info     : e.STRPTR;     (* Info string        *)
  63.     version  : e.STRPTR;     (* Version            *)
  64.     release  : e.STRPTR;     (* Release            *)
  65.     date     : e.STRPTR;     (* Compilation date   *)
  66.     appPort  : e.MsgPortPtr; (* AppMessage port    *)
  67.   END;
  68.  
  69. (* --- The Dimensions Structure --- *)
  70.  
  71.   Dimensions* = RECORD
  72.     left*     : e.UWORD;            (* Left                  *)
  73.     top*      : e.UWORD;            (* Top                   *)
  74.     width*    : e.UWORD;            (* Width                 *)
  75.     height*   : e.UWORD;            (* Height                *)
  76.     left2*    : e.UWORD;            (* Left                  *)
  77.     top2*     : e.UWORD;            (* Top                   *)
  78.     width2*   : e.UWORD;            (* Width                 *)
  79.     height2*  : e.UWORD;            (* Height                *)
  80.     zoomed*   : e.BOOL;             (* Window zoomed?        *)
  81.     reserved* : ARRAY 3 OF e.UWORD; (* For future expansions *)
  82.   END;
  83.  
  84. (* --- The Project Structure --- *)
  85.  
  86.   Project* = RECORD (* This structure is PRIVATE! *)
  87.     app                  : AppPtr;            (* Our application *)
  88.     screen               : i.ScreenPtr;       (* Our screen, always valid *)
  89.     lockedPubScreen      : i.ScreenPtr;       (* Only valid if we're using a PubScreen *)
  90.     window               : i.WindowPtr;       (* The window *)
  91.     id                   : e.ULONG;           (* The window ID *)
  92.     appWindow            : w.AppWindowPtr;    (* AppWindow for icon dropping *)
  93.     idcmpFlags           : e.ULONG;           (* The IDCMP flags *)
  94.     flags                : e.ULONG;           (* Triton window flags *)
  95.     newMenu              : gt.NewMenuPtr;     (* The newmenu stucture built by Triton *)
  96.     newMenuSize          : e.ULONG;           (* The number of menu items in the list *)
  97.     menu                 : i.MenuPtr;         (* The menu structure *)
  98.     nextSelect           : e.UWORD;           (* The next selected menu item    *)
  99.     visualInfo           : e.ADDRESS;         (* The VisualInfo of our window *)
  100.     drawInfo             : i.DrawInfoPtr;     (* The DrawInfo of the screen *)
  101.     dimensions           : DimensionsPtr;     (* User-supplied dimensions *)
  102.     windowStdHeight      : e.ULONG;           (* The standard height of the window *)
  103.     leftBorder           : e.ULONG;           (* The width of the left window border *)
  104.     rightBorder          : e.ULONG;           (* The width of the right window border *)
  105.     topBorder            : e.ULONG;           (* The height of the top window border *)
  106.     bottomBorder         : e.ULONG;           (* The height of the bottom window border *)
  107.     innerWidth           : e.ULONG;           (* The inner width of the window *)
  108.     innerHeight          : e.ULONG;           (* The inner height of the window *)
  109.     zipDimensions        : ARRAY 4 OF e.WORD; (* The dimensions for the zipped window *)
  110.     aspectFixing         : e.UWORD;           (* Pixel aspect correction factor *)
  111.     objectList           : e.MinList;         (* The list of display objects *)
  112.     menuList             : e.MinList;         (* The list of menus *)
  113.     idList               : e.MinList;         (* The ID linking list (menus & objects) *)
  114.     memPool              : e.ADDRESS;         (* The memory pool for the lists *)
  115.     hasObjects           : e.BOOL;            (* Do we have display objects ? *)
  116.     propAttr             : gfx.TextAttrPtr;   (* The proportional font attributes *)
  117.     fixedWidthAttr       : gfx.TextAttrPtr;   (* The fixed-width font attributes *)
  118.     propFont             : gfx.TextFontPtr;   (* The proportional font *)
  119.     fixedWidthFont       : gfx.TextFontPtr;   (* The fixed-width font *)
  120.     openedPropFont       : e.BOOL;            (* \ Have we opened the fonts ? *)
  121.     openedFixedWidthFont : e.BOOL;            (* / *)
  122.     totalPropFontHeight  : e.UWORD;           (* Height of prop font incl. underscore *)
  123.     backfillType         : e.ULONG;           (* The backfill type *)
  124.     backfillHook         : u.HookPtr;         (* The backfill hook *)
  125.     gadToolsGadgetList   : i.GadgetPtr;       (* List of GadTools gadgets *)
  126.     prevGadget           : i.GadgetPtr;       (* Previous GadTools gadget *)
  127.     newGadget            : gt.NewGadgetPtr;   (* GadTools NewGadget *)
  128.     invisibleRequest     : i.RequesterPtr;    (* The invisible blocking requester *)
  129.     isUserLocked         : e.BOOL;            (* Project locked by the user? *)
  130.     currentID            : e.ULONG;           (* The currently keyboard-selected ID *)
  131.     isCancelDown         : e.BOOL;            (* Cancellation key pressed? *)
  132.     isShortcutDown       : e.BOOL;            (* Shortcut key pressed? *)
  133.     underscore           : e.UBYTE;           (* The underscore character *)
  134.     escClose             : e.BOOL;            (* Close window on Esc ? *)
  135.     delZip               : e.BOOL;            (* Zip window on Del ? *)
  136.     pubScreenFallBack    : e.BOOL;            (* Fall back onto default public screen ? *)
  137.     fontFallBack         : e.BOOL;            (* Fall back to topaz.8 ? *)
  138.     oldWidth             : e.UWORD;           (* Old window width *)
  139.     oldHeight            : e.UWORD;           (* Old window height *)
  140.   END;
  141.  
  142. CONST
  143.  
  144. (* --- Message classes --- *)
  145.  
  146.   msCloseWindow* = 1; (* The window should be closed *)
  147.   msError*       = 2; (* An error occured. Error code in trm_Data *)
  148.   msNewValue*    = 3; (* Object's value has changed. New value in trm_Data *)
  149.   msAction*      = 4; (* Object has triggered an action *)
  150.   msIconDropped* = 5; (* Icon dropped over window (ID=0) or DropBox. AppMessage* in trm_Data *)
  151.   msKeyPressed*  = 6; (* Key pressed. trm_Data contains ASCII code, trm_Code raw code and *)
  152.                                     (* trm_Qualifier contains qualifiers *)
  153. (* --- Triton error codes --- *)
  154.  
  155.   erOk*              = 0;  (* No error *)
  156.   erAllocMem*        = 1;  (* Not enough memory *)
  157.   erOpenWindow*      = 2;  (* Can't open window *)
  158.   erWindowTooBig*    = 3;  (* Window would be too big for screen *)
  159.   erDrawInfo*        = 4;  (* Can't get screen's DrawInfo *)
  160.   erOpenFont*        = 5;  (* Can't open font *)
  161.   erCreateMsgPort*   = 6;  (* Can't create message port *)
  162.   erInstallObject*   = 7;  (* Can't create an object *)
  163.   erCreateClass*     = 8;  (* Can't create a class *)
  164.   erNoLockPubScreen* = 9;  (* Can't lock public screen *)
  165.   erInvalid*         = 10; (* Invalid NewMenu structure -> probably a bug in Triton *)
  166.   erNoMem*           = 11; (* Not enough memory for menu creation *)
  167.   erOtherCreate*     = 12; (* Other error while creating the menus *)
  168.   erLayout*          = 13; (* GadTools can't layout the menus *)
  169.   erCreateContext*   = 14; (* Can't create gadget context *)
  170.   erMaxErrorNum      = 15; (* PRIVATE! *)
  171.  
  172. (* --- Tags for OpenWindow() --- *)
  173.  
  174. (* Window *)
  175.   wiTitle*              = (u.user+1);  (* STRPTR: The window title *)
  176.   wiFlags*              = (u.user+2);  (* See below for window flags *)
  177.   wiUnderscore*         = (u.user+3);  (* POINTER TO CHAR: The underscore for menu and gadget shortcuts *)
  178.   wiPosition*           = (u.user+4);  (* Window position, see below *)
  179.   wiCustomScreen*       = (u.user+5);  (* ScreenPtr *)
  180.   wiPubScreen*          = (u.user+6);  (* ScreenPtr, must have been locked! *)
  181.   wiPubScreenName*      = (u.user+7);  (* STRPTR, Triton is doing the locking *)
  182.   wiPropFontAttr*       = (u.user+8);  (* TextAttrPtr: The proportional font *)
  183.   wiFixedWidthFontAttr* = (u.user+9);  (* TextAttrPtr: The fixed-width font *)
  184.   wiBackfill*           = (u.user+10); (* The backfill type, see below *)
  185.   wiID*                 = (u.user+11); (* ULONG: The window ID *)
  186.   wiDimensions*         = (u.user+12); (* DimensionsPtr *)
  187.  
  188. (* Menus *)
  189.   mnTitle* = (u.user+101); (* STRPTR: Menu *)
  190.   mnItem*  = (u.user+102); (* STRPTR: Menu item *)
  191.   mnSub*   = (u.user+103); (* STRPTR: Menu subitem *)
  192.   mnFlags* = (u.user+104); (* See below for flags *)
  193.  
  194. (* General object attributes *)
  195.   atID*        = (u.user+150); (* The object's/menu's ID *)
  196.   atFlags*     = (u.user+151); (* The object's flags *)
  197.   atValue*     = (u.user+152); (* The object's value *)
  198.   atText*      = (u.user+153); (* The object's text *)
  199.   atDisabled*  = (u.user+154); (* Disabled object? *)
  200.   atBackfill*  = (u.user+155); (* Backfill pattern *)
  201.   atMinWidth*  = (u.user+156); (* Minimum width *)
  202.   atMinHeight* = (u.user+157); (* Minimum height *)
  203.  
  204.   user* = (u.user+800); (* Add something to get your own IDs *)
  205.  
  206. (* Magic code *)
  207.   magicObjBeg* = (u.user+200); (* PRIVATE! *)
  208.   magicObjEnd* = (u.user+999); (* PRIVATE! *)
  209.   magicSpcBeg* = (u.user+900); (* PRIVATE! *)
  210.   magicSpcEnd* = (u.user+999); (* PRIVATE! *)
  211.  
  212. (* --- Window flags --- *)
  213.  
  214.   wiBackDrop*        = 000000001H; (* Create a backdrop borderless window *)
  215.   wiNoDragBar*       = 000000002H; (* Don't use a dragbar *)
  216.   wiNoDepthGadget*   = 000000004H; (* Don't use a depth-gadget *)
  217.   wiNOCloseGadget*   = 000000008H; (* Don't use a close-gadget *)
  218.   wiNoActivate*      = 000000010H; (* Don't activate window *)
  219.   wiNoEscClose*      = 000000020H; (* Don't send closeWindow when Esc is pressed *)
  220.   wiNoPScrFallback*  = 000000040H; (* Don't fall back onto default PubScreen *)
  221.   wiNoZipGadget*     = 000000080H; (* Don't use a zip-gadget *)
  222.   wiZipCenterTop*    = 000000100H; (* Center the zipped window on the title bar *)
  223.   wiNoMinTextWidth*  = 000000200H; (* Minimum window width not according to title text *)
  224.   wiNoSizeGadget*    = 000000400H; (* Don't use a sizing-gadget *)
  225.   wiNoFontFallback*  = 000000800H; (* Don't fall back to topaz.8 *)
  226.   wiNoDelZip*        = 000001000H; (* Don't zip the window when Del is pressed *)
  227.   wiSimpleRefresh*   = 000002000H; (* Use simple refresh instead of smart refresh *)
  228.   wiZipToCurrentPos* = 000004000H; (* Will zip the window at the current position (OS3.0+) *)
  229.   wiAppWindow*       = 000008000H; (* Create an AppWindow without using class_dropbox *)
  230.   wiActivateStrGad*  = 000010000H; (* Activate the first string gadget after opening the window *)
  231.  
  232.  
  233. (* --- Menu flags --- *)
  234.  
  235.   mnCheckIt*  = 000000001H; (* Leave space for a checkmark *)
  236.   mnChecked*  = 000000002H; (* Check the item (includes TRMF_CHECKIT) *)
  237.   mnDisabled* = 000000004H; (* Ghost the menu/item *)
  238.  
  239. (* --- Window positions --- *)
  240.  
  241.   wpDefault*       = 0;    (* Let Triton choose a good position *)
  242.   wpBelowTitlebar* = 1;    (* Left side of screen, below title bar *)
  243.   wpCenterTop*     = 1025; (* Top of screen, centered on the title bar *)
  244.   wpTopLeftScreen* = 1026; (* Top left corner of screen *)
  245.   wpCenterScreen*  = 1027; (* Centered on the screen *)
  246.   wpCenterDisplay* = 1028; (* Centered on the currently displayed clip *)
  247.   wpMousePointer*  = 1029; (* Under the mouse pointer *)
  248.   wpMagic          = 1024; (* PRIVATE! *)
  249.  
  250. (* --- Backfill types --- *)
  251.  
  252.   bfWindowBack*       = 0;  (* Window backfill colors *)
  253.   bfRequesterBack*    = 1;  (* Requester backfill colors *)
  254.   bfNone*             = 2;  (* No backfill (= Fill with BACKGROUNDPEN) *)
  255.   bfShine*            = 3;  (* Fill with SHINEPEN *)
  256.   bfShineShadow*      = 4;  (* Fill with SHINEPEN + SHADOWPEN *)
  257.   bfShineFill*        = 5;  (* Fill with SHINEPEN + FILLPEN *)
  258.   bfShineBackground*  = 6;  (* Fill with SHINEPEN + BACKGROUNDPEN *)
  259.   bfShadow*           = 7;  (* Fill with SHADOWPEN *)
  260.   bfShadowFill*       = 8;  (* Fill with SHADOWPEN + FILLPEN *)
  261.   bfShadowBackground* = 9;  (* Fill with SHADOWPEN + BACKGROUNDPEN *)
  262.   bfFill*             = 10; (* Fill with FILLPEN *)
  263.   bfFillBackground*   = 11; (* Fill with FILLPEN + BACKGROUNDPEN *)
  264.  
  265. (* --- Display Object flags --- *)
  266.  
  267. (* General flags *)
  268.   ofRaised* = 000000001H; (* Raised object *)
  269.   ofHoriz*  = 000000002H; (* Horizontal object \ Works automatically *)
  270.   ofVert*   = 000000004H; (* Vertical object   / in groups *)
  271.  
  272. (* Text flags *)
  273.   txNoUnderscore* = 000000100H; (* Don't interpret underscores *)
  274.   txHighlight*    = 000000200H; (* Highlight text *)
  275.   tx3D*           = 000000400H; (* 3D design *)
  276.   txBold*         = 000000800H; (* Softstyle 'bold' *)
  277.   txTitle*        = 000001000H; (* A title (e. of a group) *)
  278.  
  279. (* --- Menu entries --- *)
  280.  
  281.   menuBarLabel* = -1; (* A barlabel instead of text *)
  282.  
  283. (* --- Tags for CreateApp() --- *)
  284.  
  285.   caName*     = (u.user+1);
  286.   caLongName* = (u.user+2);
  287.   caInfo*     = (u.user+3);
  288.   caVersion*  = (u.user+4);
  289.   caRelease*  = (u.user+5);
  290.   caDate*     = (u.user+6);
  291.  
  292. (* --- Tags for EasyRequest() --- *)
  293.  
  294.   ezReqPos*      = (u.user+1);
  295.   ezLockProject* = (u.user+2);
  296.   ezReturn*      = (u.user+3);
  297.   ezTitle*       = (u.user+4);
  298.   ezActivate*    = (u.user+5);
  299.  
  300. (* --- Default classes, attributes and flags --- *)
  301.  
  302. (* Classes *)
  303.   obButton*   = (u.user+305); (* A BOOPSI button gadget *)
  304.   obCheckBox* = (u.user+303); (* A checkbox gadget *)
  305.   obCycle*    = (u.user+310); (* A cycle gadget *)
  306.   obFrameBox* = (u.user+306); (* A framing box *)
  307.   obDropBox*  = (u.user+312); (* An icon drop box *)
  308.   grHoriz*    = (u.user+201); (* Horizontal group, see below for types *)
  309.   grVert*     = (u.user+202); (* Vertical group, see below for types *)
  310.   grEnd*      = (u.user+203); (* End of a group *)
  311.   obLine*     = (u.user+301); (* A simple line *)
  312.   obPalette*  = (u.user+307); (* A palette gadget *)
  313.   obScroller* = (u.user+309); (* A scroller gadget *)
  314.   obSlider*   = (u.user+308); (* A slider gadget *)
  315.   obSpace*    = (u.user+901); (* The spaces class *)
  316.   obString*   = (u.user+311); (* A string gadget *)
  317.   obText*     = (u.user+304); (* A line of text *)
  318.   obListview* = (u.user+313); (* A listview gadget *)
  319.   obProgress* = (u.user+314); (* A progress indicator *)
  320.  
  321. (* Button *)
  322.   buReturnOk*  = 000010000H; (* <Return> answers the button *)
  323.   buEscOk*     = 000020000H; (* <Esc> answers the button *)
  324.   buShifted*   = 000040000H; (* Shifted shortcut only *)
  325.   buUnshifted* = 000080000H; (* Unshifted shortcut only *)
  326.   btText*      = 0;          (* Text button *)
  327.   btGetFile*   = 1;          (* GetFile button *)
  328.   btGetDrawer* = 2;          (* GetDrawer button *)
  329.   btGetEntry*  = 3;          (* GetEntry button *)
  330.  
  331. (* Group *)
  332.   grPropShare*  = 000000000H; (* Divide objects proportionally *)
  333.   grEqualShare* = 000000001H; (* Divide objects equally *)
  334.   grPropSpaces* = 000000002H; (* Divide spaces proportionally *)
  335.   grArray*      = 000000004H; (* Top-level array group *)
  336.   grAlign*      = 000000008H; (* Align resizeable objects in secondary dimension *)
  337.   grCenter*     = 000000010H; (* Center unresizeable objects in secondary dimension *)
  338.   grFixHoriz*   = 000000020H; (* Don't allow horizontal resizing *)
  339.   grFixVert*    = 000000040H; (* Don't allow vertical resizing *)
  340.  
  341. (* Scroller *)
  342.   scTotal*   = (u.user+1504);
  343.   scVisible* = (u.user+1505);
  344.  
  345. (* Slider *)
  346.   slMin* = (u.user+1502);
  347.   slMax* = (u.user+1503);
  348.  
  349. (* Space *)
  350.   stNone*   = 1; (* No space *)
  351.   stSmall*  = 2; (* Small space *)
  352.   stNormal* = 3; (* Normal space (default) *)
  353.   stBig*    = 4; (* Big space *)
  354.  
  355. (* Listview *)
  356.   lvTop*          = (u.user+1506);
  357.   lvReadOnly*     = 000010000H;    (* A read-only list *)
  358.   lvSelect*       = 000020000H;    (* You may select an entry *)
  359.   lvShowSelected* = 000040000H;    (* Selected entry will be shown *)
  360.   lvNoCursorKeys* = 000080000H;    (* Don't use arrow keys *)
  361.   lvNoNumPadKeys* = 000100000H;    (* Don't use numeric keypad keys *)
  362.   lvFWFont*       = 000200000H;    (* Use the fixed-width font *)
  363.  
  364. VAR
  365.  
  366. VAR
  367.  
  368.   base *: e.LibraryPtr;
  369.   supportApp : AppPtr;
  370.  
  371.  
  372. (** --- Library Functions ------------------------------------------------ *)
  373.  
  374. PROCEDURE OpenProject* [base,-30]
  375.   ( app[9]: AppPtr; tagList[8]: ARRAY OF u.TagItem )
  376.   : ProjectPtr;
  377. PROCEDURE OpenProjectTags* [base,-30]
  378.   ( app[9]: AppPtr; tag[8]..: u.Tag )
  379.   : ProjectPtr;
  380. PROCEDURE CloseProject*      [base,-36]
  381.   ( project[8]: ProjectPtr );
  382. PROCEDURE FirstOccurance* [base,-42]
  383.   ( ch[0]: e.UBYTE; str[8]: e.STRPTR )
  384.   : e.LONG;
  385. PROCEDURE NumOccurances* [base,-48]
  386.   ( ch[0]: e.UBYTE; str[8]: e.STRPTR )
  387.   : e.LONG;
  388. PROCEDURE GetErrorString* [base,-54]
  389.   ( num[0]: e.UWORD): e.STRPTR;
  390. PROCEDURE CloseWindowSafely* [base,-126]
  391.   ( win[8]: i.WindowPtr );
  392. PROCEDURE GetMsg* [base,-108]
  393.   ( app[9]: AppPtr )
  394.   : MessagePtr;
  395. PROCEDURE ReplyMsg* [base,-114]
  396.   ( msg[9]: MessagePtr );
  397. PROCEDURE Wait* [base,-120]
  398.   ( app[9]: AppPtr; otherbits[0]: e.ULONG )
  399.   : e.ULONG;
  400. PROCEDURE SetAttribute* [base,-60]
  401.   ( prj[8]: ProjectPtr; id[0]: e.ULONG; attr[1]: e.ULONG; value[2]: e.ULONG );
  402. PROCEDURE GetAttribute* [base,-66]
  403.   ( prj[8]: ProjectPtr; id[0]: e.ULONG; attr[1]: e.ULONG )
  404.   : e.ULONG;
  405. PROCEDURE LockProject* [base,-72]
  406.   ( prj[8]: ProjectPtr );
  407. PROCEDURE UnlockProject* [base,-78]
  408.   ( prj[8]: ProjectPtr );
  409. PROCEDURE AutoRequest* [base,-84]
  410.   ( app[9]: AppPtr; lockProject[8]: ProjectPtr; requestTRWindowTags[10]: ARRAY OF u.TagItem )
  411.   : e.ULONG;
  412. PROCEDURE AutoRequestTags* [base,-84]
  413.   ( app[9]: AppPtr; lockProject[8]: ProjectPtr; tag[10]..: u.Tag )
  414.   : e.ULONG;
  415. PROCEDURE EasyRequest* [base,-90]
  416.   ( app[9]: AppPtr; bodyFmt[10]: e.STRPTR; gadFmt[11]: e.STRPTR; tagList[8]: ARRAY OF u.TagItem )
  417.   : e.ULONG;
  418. PROCEDURE EasyRequestTags* [base,-90]
  419.   ( app[9]: AppPtr; bodyFmt[10]: e.STRPTR; gadFmt[11]: e.STRPTR; tag[8]..: u.Tag )
  420.   : e.ULONG;
  421. PROCEDURE CreateApp* [base,-96]
  422.   ( appTags[9]: ARRAY OF u.TagItem )
  423.   : AppPtr;
  424. PROCEDURE DeleteApp* [base,-102]
  425.   ( app[9]: AppPtr );
  426. PROCEDURE CreateAppTags* [base,-96]
  427.   ( appTags[9]..: u.Tag )
  428.   : AppPtr;
  429.  
  430. (* I'm not sure where this call belongs. [phf] *)
  431. (*
  432. extern BOOL                __saveds __asm  TR_AddClass(register __d0 ULONG tag, register __a0 ULONG ( *dispatcher)());
  433. *)
  434.  
  435.  
  436. (*--- Library Base variable --------------------------------------------*)
  437.  
  438. <*$LongVars-*>
  439.  
  440. (*------------------------------------*)
  441. PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
  442.  
  443. BEGIN (* CloseLib *)
  444.   IF base # NIL THEN e.CloseLibrary (base) END
  445. END CloseLib;
  446.  
  447. BEGIN
  448.   (* supportApp is not used currently *)
  449.   supportApp := NIL;
  450.  
  451.   base := e.OpenLibrary (tritonName, 0);
  452.   IF base # NIL THEN Kernel.SetCleanup (CloseLib) END;
  453. END Triton.
  454.